home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Grand Slam 3
/
Grand Slam 3.iso
/
023
/
dgtrekr3.arj
/
DRV_SRC.EXE
/
MIDDRIVR.INC
< prev
next >
Wrap
Text File
|
1994-09-05
|
3KB
|
61 lines
; middrivr.inc
;
; Assembler: Microsoft MASM 6.0
;
; This file contains information about the DigiTrekker MIDI driver layout
; including constant values and description of parameters to functions
;--------------------------------------------------------------------------
;---------------------------------.
; header of a MIDI device driver |
;---------------------------------+----------------------------------------
; This header must start at the first byte of the driver
midDriverHeader struc
signature db 8 dup (?) ; "MIDIDRV",EOF
dispatcher dw ? ; entry point for function calls
; e.g. offset myDispatcher
infoStr dw ? ; Offset of ASCIIZ-information string
; (description of MIDI card,(C)... )
midDriverHeader ends
;----------------------------------------------------.
; function numbers passed to the dispatcher function |
;----------------------------------------------------+---------------------
MDRV_Init equ 0 ; hook interrupts, search soundcard, ...
MDRV_SetClient equ 1 ; set address message handler function
MDRV_Write equ 2 ; write a byte to MIDI
MDRV_Terminate equ 3 ; unkook interrupts, clean up
COMMENT #
;======== dispatcher ==================
; Interface between the driver and DigiTrekker. All functions are called
; thru passing a function number to the dispatcher.
; I: BX function number (see the MDRV_* constants)
; ... specific for the function
; O: CARRY error, AX=error code
; ... specific for the function
;======== MDRV_Init ====================
; This function is called at startup to initialize the driver.
; Typical actions are installing interrupt handlers, resetting the Card and
; returning an error status if card won't work
; I: -
; O: error (ERR_NoCard)
;======== MDRV_SetClient ===============
; Set the MIDI message handler function. Every time a full MIDI message with
; all data bytes has been received, this function should be called.
; The function is in C style and expect a far pointer to the midi message as
; the only parameter on the stack. The first byte of the message is the
; command, all following are data bytes.
; A null pointer for the handler will disable tracking MIDI messages
;
; Notice: The handler will alter many registers, so save them !!!
; I: EAX far pointer to handler function (seg=HIWORD, offs=LOWORD(=AX))
; O: error
# ENDCOMMENT